/**
  * @file    :cpp20220406_3.1.2_func_power.cpp
  * @brief   :power
  * @author  :renqiang
  * @version :V1.0.0
  * @date    :2022-04-06
  */
#include <iostream>
using namespace std;

double power(double x, int n){
    double result = 1.0;
    for(int i = 0; i < n; i++){
        result *= x;
    }
    return result;
}


int main()
{
   double pow;
   pow = power(5,2);
   cout <<pow<<endl;
   return 0;
}
